package com.wangtongxiao.controller;

import com.wangtongxiao.beans.Activity;
import com.wangtongxiao.beans.Value;
import com.wangtongxiao.dto.ResultPageDTO;
import com.wangtongxiao.services.ActivityServices;
import com.wangtongxiao.services.ValueServices;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.HashMap;

@RestController
@RequestMapping("Activity")
public class ActivityController {
    @Autowired
    ActivityServices activityServices;
    @RequestMapping("getAll.action")
    public ResultPageDTO<Activity> getAll(ResultPageDTO<Activity> resultPageDTO){

        ArrayList<Activity> all = activityServices.getAll(resultPageDTO);
        resultPageDTO.setData(all);

        return resultPageDTO;
    }

}
